Is Your JavaScript Feeling Bloated?
JavaScript is not a compiled language like C, C++, or Java. The code you write is the code the browser evaluates to perform actions. Hopefully you've been a good little coder by commenting your code well, indenting, and using descriptive variable names. The problem is that every time a browser requests your code it gets not only the code it needs to run but also a lot of baggage that makes your life easier. Browsers don't care if your code is pretty, they just care if it's syntactically correct. They won't read your comments and they don't even care what your local variables are named.
Solid Foundation
Most JavaScript compactors and compressors are based on regular expressions. Ours is based on Dojo's ShrinkSafe compressor which in turn is based on Mozilla's Rhino, an open source JavaScript interpreter. By starting with the Dojo compressor we can leverage the countless hours spent building and debugging these excellent products.
Obfuscation
This JavaScript compactor replaces locally defined variable names with the shortest name possible. In almost every case you'll end up with a single character variable name. At the same time it preserves all global variable and function names so anything relying on the script will still work. This effectively serves as a JavaScript obfuscator.
JavaScript Compactor
By trimming unnecessary fluff and renaming local variables ScriptingMagic can often cut JavaScript files in half. This means faster load times for your clients and less bandwidth usage for you. Give it a try, we think you'll like it!
Note
The JavaScript Compactor performs a lossy compression! Make sure you don't overwrite your original JavaScript file because you cannot reverse the effect of the compactor. Local variable names are replaced and are non-recoverable.